<?php
Route::get('/login','AuthController@index');
Route::post('/login','AuthController@token');
Route::get('/user/init','AuthController@initUser');

Route::get('/users','AdminController@index');
Route::get('/permissions','PermissionController@index');
Route::get('/roles','RoleController@index');
Route::any('/sms/list_page','Sms\SmsManageController@index');
Route::any('/goods/list_page','Goods\GoodsController@index');
//产品预览页面
Route::any('/goods/item','Goods\GoodsController@prodView');
//Route::get('/','Order\OrderController@index');
Route::get('/','HomeController@index');
Route::get('/liver/list_page','Order\OrderController@index');
Route::get('/order/manu','Order\OrderController@manu');
Route::get('/order/sett_page','Order\OrderSettController@index');
//物流查询页面
Route::get('/order/logistics','Order\OrderController@logistics');
Route::get('/manu/list','Manu\ManuController@index');
Route::get('/mate/index','Mate\MateController@index');
Route::get('/app/product','Goods\GoodsController@app');
//用户商品反馈
Route::get('/app/que','Goods\GoodsController@que');

//media
    //wtt 微头条数据汇总
Route::get('/media/wtt','Media\Wtt\MediaController@index');
Route::get('/media/bliPage','Media\BliUper\BliUperController@index');
Route::get('/media/article','Media\Article\ArticlesController@index');

//产品监控报表
Route::any('/goods/supe_list_page','Goods\GoodsSuperviseController@index');

//微信订单
Route::any('/wechat/wechat_page','Order\OrderWeChatController@index');
//青云计划
Route::any('/media/qingyun_page','Media\Qingyun\QingyunController@index');
//退款率报表
Route::any('/order/refund_page','Order\OrderRefundController@index');
//退货订单
Route::any('/order/refund','Order\OrderRefundController@refund');

//订单匹配
Route::any('/order/marry','Order\OrderMarryController@index');



/********淘宝订单模块*********/
Route::get('/order/taobao_index','Order\TaobaoOrderController@index');
Route::get('/order/taobao/buyer/page','Order\TaobaoOrderController@buyerPage');
Route::get('/order/taobao/liver/page','Order\TaobaoOrderController@liverPage');
Route::get('/order/taobao/liver_export','Order\TaobaoOrderController@liverExport');
/********淘宝订单模块*********/

//用户反馈
Route::any('/feedback/index','Order\OrderFeedbackController@index');


//供应链
Route::get('/scm/index','Scm\ScmController@index');

//阿里妈妈订单
Route::get('/alimama/index','Alimama\OrderController@index');


Route::group(['middleware' => ['admin_auth']],function(){
    //菜单列表
    Route::get('/menus','PermissionController@menus');
    //管理员模块
    Route::get('/users/list','AdminController@list');
    Route::post('/users/store','AdminController@store');
    Route::post('/users/del','AdminController@del');

    //权限模块
    Route::get('/permission/list','PermissionController@list');
    Route::post('/permission/store','PermissionController@store');
    Route::post('/permission/del','PermissionController@del');

    //角色模块
    Route::get('/role/list','RoleController@list');
    Route::post('/role/store','RoleController@store');
    Route::post('/role/del','RoleController@del');


    //订单模块
    Route::group(['prefix' => 'order','namespace' => 'Order'],function(){
        Route::post('/import','OrderController@orderImport');
        //订单修改
        Route::post('/edit','OrderController@orderEdit');
        //订单主播统计
        Route::get('/liver/count','OrderController@OrderLiverCount');
        //订单厂家统计
        Route::get('/manu/count','OrderController@OrderManuCount');
        //订单状态统计
        Route::get('/status/count','OrderController@orderStatusCount');

        //订单列表
        Route::get('/list','OrderController@orderList');
        //订单导出
        Route::get('/export','OrderController@orderExp');
        Route::get('/export_goods','OrderController@goodsExp');
        //物流任务创建
        Route::post('/logistics/task','OrderController@logisticsTask');
        //物流任务创建
        Route::post('/logistics/tmp_task','OrderController@logisticsTmpTask');

        //物流任务查询
        Route::post('/logistics/query','OrderController@logisticsQuery');
        //物流导出
        Route::get('/logistics/export','OrderController@logisticsExp');
        //订单结算列表 /admin/order/sett/list
        Route::get('/sett/list','OrderSettController@OrderSettList');
        //订单结算导出 /sett/exp
        Route::get('/sett/exp','OrderSettController@OrderSettExp');

        //退款登记
        Route::get('/store_refund','OrderController@storeRefund');

        //微信订单
        //微信订单导入
        Route::post('/wechat/import','OrderWeChatController@orderWechatImport');
        //微信订单列表
        Route::get('/wechat/list','OrderWeChatController@list');

        //退货订单
        Route::get('/refund/list','OrderRefundController@list');
        //登记退货订单
        Route::post('/refund/register','OrderRefundController@register');
        //售卖登记
        Route::post('/refund/sale_reg','OrderRefundController@saleRegister');
        //导出
        Route::get('/refund/export','OrderRefundController@export');
        //删除
        Route::get('/refund/delete','OrderRefundController@delete');


    //用户订单
        Route::post('/user/generate','OrderUserController@userRateGenerate');
        //查询
        Route::get('/user/rate','OrderUserController@list');


        //导入厂家打印记录订单
        Route::post('/marry/print_import','OrderMarryController@printOrder');
        //导入回填订单
        Route::post('/marry/back_import','OrderMarryController@backOrder');

        /********淘宝订单模块*********/
        Route::get('/taobao/list','TaobaoOrderController@list');
        Route::post('/taobao/import','TaobaoOrderController@import');
        Route::post('/taobao/export','TaobaoOrderController@export');
        Route::get('/taobao/buyer/list','TaobaoOrderController@buyerList');
        Route::get('/taobao/buyer_export','TaobaoOrderController@buyerExport');
        Route::get('/taobao/storeMark','TaobaoOrderController@storeMark');
        Route::get('/taobao/liver/business','TaobaoOrderController@liverBusiness');
        /********淘宝订单模块*********/

    });

    //配置模块
    Route::group(['prefix' => 'config','namespace' => 'Config'],function(){
        //配置设置
        Route::post('/set','ConfigController@setConf');
        //获取设置
        Route::get('/get','ConfigController@getConf');
    });

    Route::group(['prefix' => 'mate','namespace' => 'Mate'],function(){
        //获取设置
        Route::get('/list','MateController@list');
        Route::get('/words','MateController@getWords');
    });

    //短信模块
    Route::group(['prefix' => 'sms'],function(){
        Route::any('/list','Sms\SmsManageController@listData');
    });

    Route::group(['prefix' => 'goods'],function(){
        Route::any('/list','Goods\GoodsController@listData');
        Route::any('/super_list','Goods\GoodsSuperviseController@list');
    });

    Route::group(['prefix' => 'manu'],function(){
        Route::any('/store','Manu\ManuController@store');
    });

    Route::group(['prefix' => 'media','namespace' => 'Media'],function(){
        Route::any('/wtt/data','Wtt\mediaController@wttData');
        Route::any('/bliuper/data','BliUper\BliUperController@BliData');
        Route::any('/qingyun/data','Qingyun\QingyunController@list');
        Route::get('/qingyun/export','Qingyun\QingyunController@qingyunExp');
    });

    //用户反馈列表
    Route::any('/feedback/list','Order\OrderFeedbackController@list');
    //回复反馈
    Route::get('/feedback/answer','Order\OrderFeedbackController@answer');

    //阿里妈妈订单业务
    Route::group(['prefix' => 'alimama','namespace' => 'Alimama'],function(){
        Route::any('/order/import','OrderController@import');
        Route::get('/orderList','OrderController@orderList');
        Route::any('/orders','OrderController@list');
    });


    Route::group(['prefix' => 'scm','namespace' => 'Scm'],function(){
        Route::get('/list','ScmController@list');
        Route::get('/change','ScmController@addScm');
        Route::get('/delete','ScmController@delete');
    });


});
